﻿@model IEnumerable<SelectListItem>
<div class="editor-label">
    Group
</div>
@Html.DropDownList("Groups", Model)

<br />

<button onclick="View()" class="btn">View</button>
<button onclick="Edit()" class="btn">Edit</button>


<script>
    function View() {
        var listItemValue = $("#Groups")[0][$("#Groups")[0].selectedIndex].innerHTML;
        location.replace("/Schedule/GetGroupSchedule/" + listItemValue);
    };
    function Edit() {
        var listItemValue = $("#Groups")[0][$("#Groups")[0].selectedIndex].innerHTML;
        location.replace("/Schedule/Edit/" + listItemValue);
    };
</script>